﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

class Program
{
    class Person
    {
        private string name;
        private int? age;

        public Person(string name, int? age)
        {
            this.Name = name;
            this.Age = age;
        }

        public string Name
        {
            get
            {
                return name;
            }
            set
            {
                if (value != null && value != "")
                {
                    name = value;
                }
                else
                {
                    throw new ArgumentException("Invalid Name");
                }
            }
        }
        public int? Age
        {
            get
            {
                return age;
            }
            set
            {
                age = value;
            }
        }

        public override string ToString()
        {
            if (age != null)
            {
                return string.Format("Name: {0}\nAge: {1}", name, age);
            }
            else
            {
                return string.Format("Name: {0}\nThe age is not defined", name);
            }
        }

    }

    static void Main(string[] args)
    {
        Person p = new Person("pe6o", null);
        Console.WriteLine(p);
        Person g = new Person("go6o", 21);
        Console.WriteLine(g);
    }
}

